home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Dev / Bgui / AutoDoc / paletteclass.doc < prev    next >
Encoding:
Text File  |  2000-05-09  |  3.3 KB  |  131 lines

  1. TABLE OF CONTENTS
  2.  
  3. paletteclass/--background--
  4. paletteclass/Methods
  5. paletteclass/Attributes
  6.  
  7. paletteclass/--background--
  8.  
  9.     NAME
  10.  
  11.         Class:        paletteclass
  12.         Superclass:   baseclass
  13.         Include File: <libraries/bgui.h>
  14.  
  15.     FUNCTION
  16.  
  17.         To  provide you with a palette selector gadget simular to the gadtools
  18.         palette gadget. It allows you to select a pen from  a range  of screen
  19.         colors or a range of pens selected by you.
  20.  
  21.         This class also implements a custom DragNDrop which  allows  the color
  22.         rectangles from the object to be dragged around the screen and dropped
  23.         on objects who are willing to accept data from the dragged object.
  24.  
  25.         Objects  from  this  class  send  out  the  following  attribute pairs
  26.         in their notification messages:
  27.  
  28.         GA_ID                - Gadget object ID.
  29.         PALETTE_CurrentColor - The currently selected pen.
  30.  
  31. paletteclass/Methods
  32.  
  33. NEW METHODS
  34.  
  35.     None.
  36.  
  37.  
  38. CHANGED METHODS
  39.  
  40.     BASE_GETDRAGOBJECT -- This class overrides the  superclass (baseclass)
  41.             to create a BitMap containing only the color that is selected.
  42.  
  43.             Please  refer  to  the  baseclass   documentation   for   more
  44.             information on this method. And how to override it.
  45.  
  46.     BASE_FREEDRAGOBJECT -- This method will free the BitMap created by the
  47.             BASE_GETDRAGOBJECT method.
  48.  
  49.             Please  refer  to  the  baseclass   documentation   for   more
  50.             information on this method. And how to override it.
  51.  
  52. paletteclass/Attributes
  53.  
  54. NOTE
  55.  
  56.     All baseclass attributes are also valid for this class.
  57.  
  58.  
  59. NAME
  60.  
  61.     PALETTE_Depth -- ( ULONG )
  62.  
  63. FUNCTION
  64.  
  65.     To determine the depth of the palette object.   Currently this is  the
  66.     only way to determine the amount of colors in the palette object. This
  67.     will always be a  power  of  2 (I.E. 2, 4, 8, 16, 32, 64, 128 or 256).
  68.     Allowable values here are 1 for two colors through 8 for 256 colors.
  69.  
  70.     Default is 1 (two colors). Applicability is (I).
  71.  
  72.  
  73. NAME
  74.  
  75.     PALETTE_ColorOffset -- ( ULONG )
  76.  
  77. FUNCTION
  78.  
  79.     To specify the first color which is used in  the palette.  Please note
  80.     that you must specify an ordinal number here, not a pen number.   This
  81.     value  must  range  between  0  and  256  minus  the  amount of colors
  82.     displayed in the palette object.
  83.  
  84.     Default is 0. Applicability is (I).
  85.  
  86.  
  87. NAME
  88.  
  89.     PALETTE_PenTable -- ( UWORD * )
  90.  
  91. FUNCTION
  92.  
  93.     To optionally specify an array with pen numbers so that you  can build
  94.     a palette object with the colors you want. Please note that  the array
  95.     must contain at least PALETTE_ColorOffset + ( 1 << PALETTE_Depth ) pen
  96.     entries. This is because the PALETTE_ColorOffset attribute  determines
  97.     at which offset in the array the class will get it's pens.
  98.  
  99.     Default is NULL. Applicability is (I).
  100.  
  101. SEE ALSO
  102.  
  103.     PALETTE_ColorOffset
  104.  
  105.  
  106. NAME
  107.  
  108.     PALETTE_CurrentColor -- ( ULONG )
  109.  
  110. FUNCTION
  111.  
  112.     To determine the currently selected pen in the palette object.  Please
  113.     note that this number is a  pen  number,  not  an ordinal color number
  114.     within the palette object itself.
  115.  
  116.     Default  is  the  first  color in the palette object. Applicability is
  117.     (ISGNU).
  118.  
  119.  
  120. NAME
  121.  
  122.     BT_DragObject -- ( BOOL )
  123.  
  124. FUNCTION
  125.  
  126.     To enable drag and drop operations with the color  rectangles  in  the
  127.     palette object.
  128.  
  129.     Default is FALSE. Applicability is (IS).
  130.  
  131.